Skip to content

Test rust 4#56

Open
2bndy5 wants to merge 13 commits into
masterfrom
test-rust
Open

Test rust 4#56
2bndy5 wants to merge 13 commits into
masterfrom
test-rust

Conversation

@2bndy5

@2bndy5 2bndy5 commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Now with PR review suggestions unified (from both tools) and thread comments that boast available auto-fixes.

@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v17.0.6) reports: 2 file(s) not formatted
  • src/demo.cpp (11 lines)
  • src/demo.hpp (25 lines)
clang-tidy (v17.0.1) reports: 8 concern(s)
  • src/demo.cpp

    src/demo.cpp:2:1: warning: [misc-include-cleaner]
    ⚡ auto-fix available

    included header demo.hpp is not used directly

        2 | #include "demo.hpp"
          | ^~~~~~~~~~~~~~~~~~~
        3 | #include <stdio.h>
  • src/demo.cpp

    src/demo.cpp:3:10: warning: [modernize-deprecated-headers]
    ⚡ auto-fix available

    inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead

        3 | #include <stdio.h>
          |          ^~~~~~~~~
          |          <cstdio>
  • src/demo.cpp

    src/demo.cpp:8:5: warning: [modernize-use-trailing-return-type]
    ⚡ auto-fix available

    use a trailing return type for this function

        8 | int main(){
          | ~~~ ^     
          | auto       -> int
  • src/demo.cpp

    src/demo.cpp:10:13: warning: [readability-braces-around-statements]
    ⚡ auto-fix available

    statement should be inside braces

       10 |     for (;;) break;
          |             ^      
          |              {
  • src/demo.cpp

    src/demo.cpp:13:5: warning: [cppcoreguidelines-pro-type-vararg]

    do not call c-style vararg functions

       13 |     printf("Hello world!\n");
          |     ^
  • src/demo.hpp

    src/demo.hpp:6:11: warning: [cppcoreguidelines-use-default-member-init]
    ⚡ auto-fix available

    use default member initializer for 'useless'

        6 |     char* useless;
          |           ^      
          |                  {"\0"}
        7 |     int numb;
        8 |     Dummy() :numb(0), useless("\0"){}
          |                       ~~~~~~~~~~~~~
  • src/demo.hpp

    src/demo.hpp:7:9: warning: [cppcoreguidelines-use-default-member-init]
    ⚡ auto-fix available

    use default member initializer for 'numb'

        7 |     int numb;
          |         ^   
          |             {0}
        8 |     Dummy() :numb(0), useless("\0"){}
          |              ~~~~~~~
  • src/demo.hpp

    src/demo.hpp:11:11: warning: [modernize-use-trailing-return-type]
    ⚡ auto-fix available

    use a trailing return type for this function

       11 |     void *not_useful(char *str){useless = str;}
          |     ~~~~~~^                    
          |     auto                        -> void *

Have any feedback or feature suggestions? Share it here.

2bndy5 added 2 commits June 23, 2026 03:35
keeps build artifacts in the build/ folder

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-format v17.0.6

Used clang-tidy v17.0.1

Only 8 out of 10 concerns fit within this pull request's diff.

Click here for a patch of fixes outside the diff

--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -3,2 +3,0 @@
-
-
@@ -14,19 +12,1 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-struct LongDiff
-{
+struct LongDiff {

Have any feedback or feature suggestions? Share it here.

Comment thread src/demo.cpp
Comment on lines 1 to 2
/** This is a very ugly test code (doomed to fail linting) */
#include "demo.hpp"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic(s)

Suggested change
/** This is a very ugly test code (doomed to fail linting) */
#include "demo.hpp"
#include <cstdio>

Comment thread src/demo.cpp
#include "demo.hpp"
#include <cstdio>
#include <cstddef>
#include <stdio.h>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic(s)

Suggested change
#include <stdio.h>
auto main() -> int
{

Comment thread src/demo.cpp
Comment on lines 5 to +10

int main()
{
for (;;)
break;


int main(){

for (;;) break;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic(s)

Suggested change
int main()
{
for (;;)
break;
int main(){
for (;;) break;
for (;;) {
break;
}

Comment thread src/demo.cpp
Comment on lines 14 to +17

return 0;
}



Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
return 0;
}
return 0;
}

Comment thread src/demo.cpp
for (;;) break;


printf("Hello world!\n");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

src/demo.cpp:13:5 warning: [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

   13 |     printf("Hello world!\n");
      |     ^

Comment thread src/demo.hpp
Comment on lines 5 to 7
class Dummy {
char* useless;
int numb;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic(s)

Suggested change
class Dummy {
char* useless;
int numb;
char* useless { "\0" };
int numb { 0 };
Dummy() { }

Comment thread src/demo.hpp
Comment on lines 9 to 10

public:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
public:
public:
auto not_useful(char* str) -> void* { useless = str; }

Comment thread src/demo.hpp
struct LongDiff
{

long diff;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Please remove the line(s)

  • 34

@2bndy5 2bndy5 Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is supposed to say line 33 not 34 here. I need to investigate. For some reason, this logic is not covered in the tests.

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot dismissed their stale review June 24, 2026 09:51

outdated review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-format v17.0.6

Used clang-tidy v17.0.1

Only 8 out of 10 concerns fit within this pull request's diff.

8 suggestions were duplicates of previous reviews.

Click here for a patch of fixes outside the diff

--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -3,2 +3,0 @@
-
-
@@ -14,19 +12,1 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-struct LongDiff
-{
+struct LongDiff {

Have any feedback or feature suggestions? Share it here.

@2bndy5

2bndy5 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

@shenxianpeng check out the new thread comment format. The clang-format list of files now shows the number of lines that need formatting (per file). And the clang-tidy notes now show if there is an auto-fix available (" ⚡ auto-fix available").

Also, the PR reviews are being reused in this test. So, the PR review summary only shows a patch of changes that does not fit in the diff (because lines-changed-only is off right now).

I'm open to feedback about the new comments. Personally I think the clang versions used might look better in a MD table:

Used clang-format v17.0.6

Used clang-tidy v17.0.1

tool version
clang-format v17.0.6
clang-tidy v17.0.1

@2bndy5

2bndy5 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author
image

This is not supposed to happen if there were reused review suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant